﻿@model WebTech.Coursework02.Models.employee
@using WebTech.Coursework02.Utilities;

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Employee Details</legend>
     
    <table>
        <tr>
            <td>
                <label>
                  @Html.DisplayNameFor(model => model.emp_no)
              </label>
            </td>
            <td>
                 <label>
                    @Html.DisplayFor(model => model.emp_no)
               </label>
            </td>
        </tr>
         ////
         <tr>
             <td>
                <label>
                  @Html.DisplayNameFor(model => model.first_name)
              </label>
            </td>
            <td>
                 <label>
                    @Html.DisplayFor(model => model.first_name)
               </label>
            </td>
        </tr>
         ////
         <tr>
             <td>
                <label>
                  @Html.DisplayNameFor(model => model.last_name)
              </label>
            </td>
            <td>
                 <label>
                    @Html.DisplayFor(model => model.last_name)
               </label>
            </td>
        </tr>
        /////
        <tr>
             <td>
                <label>
                  @Html.DisplayNameFor(model => model.birth_date)
              </label>
            </td>
            <td>
                 <label>
                    @Html.DisplayFor(model => model.birth_date)
               </label>
            </td>
        </tr>
        /////
        <tr>
             <td>
                <label>
                  @Html.DisplayNameFor(model => model.hire_date)
              </label>
            </td>
            <td>
                 <label>
                    
                    @Html.DisplayFor(model => model.hire_date)
               </label>
            </td>
        </tr>

       
    </table>
</fieldset>
<p>
    @if(User.Identity.IsAuthenticated == true)
    {
         @Html.ActionLink("Edit", "Edit", new {  id=Model.emp_no })   
    }
    else
    {
         @Html.ActionLink("Back", "Login", "Account")
    }
    
    
 
   
</p>
